package com.probiz.estore.exports.util;

import java.util.LinkedHashMap;

import org.apache.commons.lang.StringUtils;

import com.probiz.estore.exports.model.Column;


public class ExportHelper {
	public static String toSelect(String value, Column column) {
		LinkedHashMap<String, String> selects=column.getSelects();
		if (value != null && selects!= null&& selects.size() > 0) {
			value=selects.get(value);
			if(value==null&&StringUtils.isEmpty(column.getDefaultValue())){
				value=selects.entrySet().iterator().next().getValue();
			}
		}
		return value;
	}
}
